<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-item-edit" th:object="${item}">
            <input id="itemId" name="itemId" th:field="*{itemId}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-3 control-label">物品名称：</label>
                <div class="col-sm-8">
                    <input id="itemName" name="itemName" th:field="*{itemName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">商品链接：</label>
                <div class="col-sm-8">
                    <input id="itemHref" name="itemHref" th:field="*{itemHref}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">价格：</label>
                <div class="col-sm-8">
                    <input id="itemPrice" name="itemPrice" th:field="*{itemPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">商品EAN：</label>
                <div class="col-sm-8">
                    <input id="itemEan" name="itemEan" th:field="*{itemEan}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">：</label>
                <div class="col-sm-8">
                    <input id="createTime" name="createTime" th:field="*{createTime}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">	
                <label class="col-sm-3 control-label">：</label>
                <div class="col-sm-8">
                    <input id="updateTime" name="updateTime" th:field="*{updateTime}" class="form-control" type="text">
                </div>
            </div>
			<div class="form-group">
				<div class="form-control-static col-sm-offset-9">
					<button type="submit" class="btn btn-primary">submit</button>
					<button onclick="$.modal.close()" class="btn btn-danger" type="button">close</button>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "module/item"
		$("#form-item-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			submitHandler: function(form) {
				$.operate.save(prefix + "/edit", $('#form-item-edit').serialize());
			}
		});
	</script>
</body>
</html>
